package hxg.thread.lock;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * @author HeXiangGuang
 * @create 2021-06-24 17:46
 */
public class TestTicket {
    public static void main(String[] args) {

        Ticket ticket = new Ticket();
//        ExecutorService es = Executors.newFixedThreadPool(4);
        ExecutorService es = Executors.newCachedThreadPool();
        for (int i = 0; i < 4; i++) {
            es.submit(ticket);
        }
        es.shutdown();
    }
}
